import request from '@/utils/request'

// 处理工单基础信息

export function getDataTest(query) {
  return request({
    url: '/car/insurance/test/' + query.carId,
    method: 'get',
    params: query
  })
}

// 新增保险信息
export function addInsuranceList(data) {
  return request({
    url: '/car/insurance/addList',
    method: 'post',
    data: data
  })
}

// 列表 保险
export function getDataList(query) {
  return request({
    url: '/car/insurance/list',
    method: 'get',
    params: query
  })
}

// 查询工单详情/car/insurance/{id}
export function getWorkDetails(id) {
  return request({
    url: '/car/insurance/getInfo/' + id,
    method: 'get'
  })
}

// 手动新增工单
export function addInsuranceWork(data) {
  return request({
    url: '/car/carWorkOrder',
    method: 'post',
    data: data
  })
}

// 删除
export function delInsurance(id) {
  return request({
    url: '/car/insurance/' + id,
    method: 'delete'
  })
}

// 编辑
export function updateInsurance(data) {
  return request({
    url: '/car/insurance',
    method: 'put',
    data: data
  })
}


//新增批量
export function newAddInsuranceList(data) {
  return request({
    url: '/car/insurance/addBatchList',
    method: 'post',
    data: data
  })
}

//导出车辆合格证相关信息
export function exportQualifiedCardList(data) {
  return request({
    url: '/car/carBasic/exportQualifiedCardList',
    method: 'post',
    data: data
  })
}
